//
// Created by masaikk on 2021/4/29.
//

#ifndef CT_LIS1_H
#define CT_LIS1_H

#include <list>
#include <iostream>

using namespace std;

class Lis1 {
private:
    list<int> list;
public:
    void addElem() {
        this->list.push_back(0);
        this->list.push_back(0);
        this->list.push_back(0);

        this->list.push_back(1);
        this->list.push_back(2);
        this->list.push_back(3);
        this->list.push_back(4);
    }

    void showElem() {
        for (int i : this->list) {
            printf("%d\n", i);
        }
    }

    void deleElem(){
        this->list.remove(0);
        // delete each element equal to 0
    }

    void execu1() {
        this->addElem();
        this->showElem();
    }
    void execu2() {
        this->addElem();
        this->deleElem();
        this->showElem();
    }

};


#endif //CT_LIS1_H
